package com.xms.core.enums;

import java.io.Serializable;

/**
 * <p>
 * 日志级别枚举
 * </p>
 *
 * @author migo
 * @since 2021/8/28
 */
public enum LogLevel implements Serializable {
    Debug(0, "Debug"),
    Information(1, "Information"),
    Warning(2, "Warning"),
    Error(3, "Error"),
    Fatal(4, "Fatal");

    LogLevel(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public boolean equals(LogLevel compared){
        return this.value() == compared.value();
    }

    public int value() {
        return value;
    }

    public String text() {
        return name;
    }

    private int value;
    private String name;
}
